package com.guoheng.hazard.sys.controller.hazard;

import com.guoheng.hazard.common.base.Result;
import com.guoheng.hazard.sys.service.hazard.MajorHazardAlarmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Date;

/**
 * 类功能描述:　报警管理
 *
 * @author fbl
 * @date 2019-11-23 18:14
 */
@RestController
@Validated
@Api(value = "报警管理")
public class MajorHazardAlarmController {
    @Resource
    MajorHazardAlarmService majorHazardAlarmService;


    @ApiOperation(value = "查询报警列表")
    @GetMapping(value = "data/major/hazard/alarms")
    public Result getAlarm(Long entprId, String entprName, Integer alarmType, Date alarmStartTime, Date alarmEndTime, Integer alarmStatus, @RequestParam(value = "pageNum") Integer pageNum, @RequestParam(value = "pageSize") Integer pageSize) {
        return majorHazardAlarmService.getAlarm(entprId, entprName, alarmType, alarmStartTime, alarmEndTime, alarmStatus, pageNum, pageSize);
    }
}